<?php

function dataBrToDataMySql($dataBr){    
    $pedacosData = explode("/", $dataBr);    
    $dataMySql = $pedacosData[2] . "-" . $pedacosData[1] . "-" . $pedacosData[0];

    return $dataMySql;
}


function dataMySqlToDataBr($dataMySql){
    $pedacosData = explode("-", $dataMySql);
    $dataBr = $pedacosData[0] . "/" . $pedacosData[1] . "/" . $pedacosData[2];

    return $dataBr;
}

?>
